package com.example.express.controller;

import com.example.express.model.TransPackage;
import com.example.express.model.TransPackageContent;
import com.example.express.service.DomainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TPCController {
    @Autowired
    DomainService service;

    @GetMapping("/history/{id}")
    public List<TransPackage> getHistoryById(@PathVariable String id) {
        return service.getHistory(id);
    }
}
